﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Reflection;

namespace aspProject.Dmain.Domain
{
    public class Product
    {
        [Key()]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public double Price { get; set; }

        

        public IEnumerable<String> GetNamesOfProps()
        {
            PropertyInfo[] objectProperties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);

             IEnumerable<String> lijst = objectProperties.Select(propInfo => propInfo.ToString()).AsEnumerable();
            return lijst;
        }
        
    }
}
